<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>地图demo</title>


    <meta name="viewport" content="initial-scale=1.0,user-scalable=no">


    <div id="container" style = " width: 1500px; height: 1000px;"></div>
</head> 
<body>
    <!-- 加载loader方法之前的设置-->
<script type="text/javascript">
     window._AMapSecurityConfig = {
            securityJsCode:'fe15dfdbe1b73c3d15ebcaa979081a8b',
        }
</script>
<script type="text/javascript" src="https://webapi.amap.com/maps?v=2.0&key=98c485ff1e3c2b4318481832bee4355a"></script>
<script src="https://webapi.amap.com/loader.js"></script>

<!--js 加载loader方法-->
<script src="https://webapi.amap.com/loader.js"></script>
<script type="text/javascript" >
AMapLoader.load({
    "key": "98c485ff1e3c2b4318481832bee4355a",              // 申请好的Web端开发者Key，首次调用 load 时必填
    "version": "2.0",   // 指定要加载的 JSAPI 的版本，缺省时默认为 1.4.15
    "plugins": [],           // 需要使用的的插件列表，如比例尺'AMap.Scale'等
    "AMapUI": {             // 是否加载 AMapUI，缺省不加载
        "version": '1.1',   // AMapUI 版本
        "plugins":['overlay/SimpleMarker'],       // 需要加载的 AMapUI ui插件
    },
    "Loca":{                // 是否加载 Loca， 缺省不加载
        "version": '2.0'  // Loca 版本
    },
}).then((AMap)=>{
        var map = new AMap.Map('container');
        map.addControl(new AMap.Scale());
    }).catch((e)=>{
        console.error(e);  //加载错误提示
    });   
</script>

<script type="text/javascript" >
    // 地图初始化应该在地图容器div已经添加到DOM树之后
    var map = new AMap.Map('container', {
      zoom:12
    })
</script>

<!--地图创建-->
<script>
    var imageLayer=new AMap.ImageLayer({
        url: 'http://yyjcs.top/dtdmeo/1.jpg',
        bounds:new AMap.Bounds(
            [116.392159,39.913331],  //x
            [116.401858,39.923715]   //y
        ),
        zoom :[15,20]
    });


 var map=new AMap.Map('container',{
    zoom:16,
    center:[116.39705,39.917301],
    viewMode:'2D',
    layers:[
    AMap.createDefaultLayer(),
            imageLayer,
    ]


 });

 

</script>

</body>
</html>
